<?php if (!defined('THINK_PATH')) exit();?>	<?php
 $config = D('Basic')->select(); ?>	
<?php
 $navs = D('Menu')->homebars(); ?>
<?php
 $links = D('Links')->linksForHome(); ?>

<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
	<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title><?php echo ($config["title"]); ?></title>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="description" content="<?php echo ($config["description"]); ?>" />
	<meta name="keywords" content="<?php echo ($config["keywords"]); ?>" />
	<!--<link href="https://fonts.googleapis.com/css?family=Raleway:200,300,400,700" rel="stylesheet">-->
	
	<!-- Animate.css -->
	<link rel="stylesheet" href="/Public/css/home/animate.css">
	<!-- Icomoon Icon Fonts-->
	<link rel="stylesheet" href="/Public/assets/css/font-awesome.min.css">
	<!-- Bootstrap  -->
	<link rel="stylesheet" href="/Public/css/bootstrap.css">
	<!-- Flexslider  -->
	<link rel="stylesheet" href="/Public/css/home/flexslider.css">
	<!-- Owl Carousel  -->
	<link rel="stylesheet" href="/Public/css/home/owl.carousel.min.css">
	<link rel="stylesheet" href="/Public/css/home/owl.theme.default.min.css">
	<!-- Theme style  -->
	<link rel="stylesheet" href="/Public/css/home/style.css">
	<!-- Modernizr JS -->
	
	
	<!--music-->
	
	<script src="/Public/js/home/modernizr-2.6.2.min.js"></script>
	<!-- FOR IE9 below -->
	<!--[if lt IE 9]>
	<script src="/Public/js/home/respond.min.js"></script>
	<![endif]-->
	<!--loading-->
	<style type="text/css">
		.sk-double-bounce {
		  width: 40px;
		  height: 40px;
		  position: relative;
		  margin: 40px auto; }
		  .sk-double-bounce .sk-child {
		    width: 100%;
		    height: 100%;
		    border-radius: 50%;
		    background-color: #27E1CE;
		    opacity: 0.6;
		    position: absolute;
		    top: 0;
		    left: 0;
		    -webkit-animation: sk-doubleBounce 2s infinite ease-in-out;
		            animation: sk-doubleBounce 2s infinite ease-in-out; }
		  .sk-double-bounce .sk-double-bounce2 {
		    -webkit-animation-delay: -1.0s;
		            animation-delay: -1.0s; }
		
		@-webkit-keyframes sk-doubleBounce {
		  0%, 100% {
		    -webkit-transform: scale(0);
		            transform: scale(0); }
		  50% {
		    -webkit-transform: scale(1);
		            transform: scale(1); } }
		
		@keyframes sk-doubleBounce {
		  0%, 100% {
		    -webkit-transform: scale(0);
		            transform: scale(0); }
		  50% {
		    -webkit-transform: scale(1);
		            transform: scale(1); } }
	</style>

	</head>
	<body>
	<div id="reloade">
		<div class="sk-double-bounce">
	        <div class="sk-child sk-double-bounce1"></div>
	        <div class="sk-child sk-double-bounce2"></div>
	    </div>
	</div>
	
	<div id="fh5co-page">
	<header id="fh5co-header" role="banner">
				<a href="/"><img class="hidden-xs" style="position: absolute;top: 10px; left: 20px;" src="../../../../Public/images/logo.png" width="180px"height="60px"/></a>
		<div class="container">
			<div class="header-inner">
				<h1 class="visible-xs-block"><a href="/">ISG</a></h1>
				<nav role="navigation">
					<ul>
						<li><a href="/" >首页</a></li>
						<?php if(is_array($navs)): foreach($navs as $key=>$nav): ?><li <?php if($nav['menu_id'] == $catid): ?>class="active"<?php endif; ?> ><a href="/index.php?c=cat&id=<?php echo ($nav["menu_id"]); ?>"><?php echo ($nav["name"]); ?></a></li><?php endforeach; endif; ?>
						<li><a href="/index.php?c=mood&a=index" >心晴</a></li>
						<li class="cta"><a href="/index.php?c=GuestBook&a=index">水一发</a></li>
					</ul>
				</nav>
			</div>
		</div>
	</header>

	
	
	
	
	
			<!--<ul class="cs_newsbox">
				<li>
					<div class="cs_thumb_pic" style="background-image: url(../../../../Public/images/image_1.jpg);"></div>
					<h5>文章标题文章标题</h5>
				</li>
				<li>
					<div class="cs_thumb_pic" style="background-image: url(../../../../Public/images/image_1.jpg);"></div>
					<h5>文章标题文章标题</h5>
				</li>
				
			</ul>-->
	
	
	
	<div class="col-md-12 cs_daohangqi hidden-xs">
		<span><a href="/">全部分类</a></span><span style="margin-left: 20px; margin-right: 20px;"><i class="fa  fa-forward"></i> </span> <span><?php echo (getCatName($webSiteMenu,$catid)); ?></span>
	</div>
	<!--文章列表-->
	<div id="cs_container" class="container" style="margin-left: auto;margin-right: auto;">
		<div class="col-md-8 cs_newslist" >
			<div id="device" class="gridalicious">
			    <?php if(is_array($news)): foreach($news as $key=>$vo): ?><div class="item" >
						<div >
							<a href="/index.php?c=detail&id=<?php echo ($vo["news_id"]); ?>"><img src="<?php echo ($vo["thumb"]); ?>"/></a>
							<p class="cs_title"><?php echo ($vo["title"]); ?></p>
							<div class="cs_info_tips">
								<span class="fa fa-clock-o cs_time_inf"><?php echo (date("Y-m-d",$vo["create_time"])); ?></span><span class="fa fa-eye cs_eyes_inf"><?php echo ($vo["count"]); ?></span><span class="fa  fa-thumbs-o-up cs_zan_inf"><?php echo ($vo["news_id"]); ?></span>	
							</div>
							
						</div>
					  </div><?php endforeach; endif; ?>	
					  
	         <!--<div class="item" >
				
					<img src="../../../../Public/images/image_1.jpg"/>
					<p class="cs_title">文章标题</p>
					<div class="cs_info_tips">
						<span class="fa fa-clock-o">2016-12-12</span> <span class="fa fa-eye">122</span>	<span class="fa  fa-thumbs-o-up">35</span>	
					</div>
				
			  </div>-->
					  
			   
			   
			      	  
			    
			   
			  
			    
			    
			    <div id="clearKIqp5" style="clear: both; height: 0px; width: 0px; display: block;"></div>
			  </div>
		</div>
		<div class="col-md-4 hidden-xs cs_side">
			<div class="" style="background-color: #777;color: #fff;text-align: center;">
				最新评论
			</div>
			<div class="cs_rank_list">
				
			</div>
			
			<div class="cs_banner_sale">
				
			</div>
		</div>
	</div>
	<!--文章列表end-->
	
	
    
	
	<!--透明背景窗口 -->
	<div class="fh5co-cta" style="background-image: url(/Public/images/slide_2.jpg);">
		<div class="overlay"></div>
		<div class="container">
			<div class="col-md-12 text-center animate-box">
				<h3>We Try To Update The Site Everyday</h3>
				<p><a href="#" class="btn btn-primary btn-outline with-arrow">Get started now! <i class="fa fa-arrow-right"></i></a></p>
			</div>
		</div>
	</div>
	<!--透明背景窗口end -->
	
	<!--底部内容-->
	<script src="/Public/js/jquery-1.11.0.js"></script>
	<script src="/Public/js/dialog.js" type="text/javascript" charset="utf-8"></script>
	<script src="/Public/js/dialog/layer.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
			var postStatus = 1;
            makeboxes = function() {
			start_num = $("#device .item").length+1;
			console.log(start_num);
                var boxes = new Array;   
                var url = '/index.php?c=cat&a=getListAjax';
                var postData ={};
                postData['catid'] = "<?php echo ($catid); ?>";
                postData['start_num'] = start_num;
                postData['pageSize'] = 10;
//              console.log(JSON.stringify(postData));
                if (postStatus == 1) {
	                $("#reloade").show();
					var display =$('#reloade').css('display');
					
	                $.post(url,postData,function(result){
						if (result.status==1) {
						 console.log(JSON.stringify(result));
						
						 $("#reloade").hide();
						$(document.body).css({
						   "overflow-x":"auto",
						   "overflow-y":"auto"
						});
						for (i=0; i<result.data.length; i++) {
							var list = result.data[i];
							div = $('<div></div>').addClass('item');
							p = '<a href="/index.php?c=detail&id='+list.news_id+'"><img src="'+list.thumb+'"/></a><p class="cs_title">'+list.title+'</p><div class="cs_info_tips"><span class="fa fa-clock-o">'+format_Date(list.create_time)+'</span> <span class="fa fa-eye">122</span><span class="fa  fa-thumbs-o-up">35</span></div>';
							div.append(p);
		                    boxes.push(div);
						} 
						$("#device").gridalicious('append',boxes);
						}else if(result.status==0){
						$("#reloade").hide();
						$(document.body).css({
						   "overflow-x":"auto",
						   "overflow-y":"auto"
						});
						 postStatus = -1;
						 return	dialog.tips(result.message);
						}
						
					},'json');
                	
                }
					
				
				
            }
            
        function scrolls () {
		    
		    $(window).scroll(function () {
		        
		       
		       
		    });
		}

        $(document).ready(function () {
        		var beforeScrollTop = document.body.scrollTop;
                $(window).scroll(function () {
                	var afterScrollTop = document.body.scrollTop;
                	delta = afterScrollTop - beforeScrollTop;
					if (delta>0) {
				        beforeScrollTop = afterScrollTop;
						console.log("down");
	                    if(($(window).scrollTop() +300) >= $("#cs_container").height()) {	
	                    	var display =$('#reloade').css('display');
							if ( display == 'none' ) {
		                    	makeboxes();
							}
	                    }
//						return "down";
					}else{
						console.log("up");
//						return "up";
					}
                	console.log(afterScrollTop+"--"+beforeScrollTop);
//              	console.log($("#cs_container").height());
                });
//                      $("#device").gridalicious('append', makeboxes());
			
            

            $("#device").gridalicious({
                gutter: 10,
                width: 200,
                animate: true,
                animationOptions: {
                        speed: 150,
                        duration: 400,
                        complete: onComplete
                },
            });

            //未使用
            function onComplete(data) { 
            	
            }

        });
        
//      时间戳格式化
        function format_Date(now) { 
			var year=now.getYear(); 
			var month=now.getMonth()+1; 
			var date=now.getDate(); 
			var hour=now.getHours(); 
			var minute=now.getMinutes(); 
			var second=now.getSeconds(); 
			return "20"+year+"-"+month+"-"+date+" "+hour+":"+minute+":"+second; 
		} 
       
    </script>

	
	
	
	<footer id="fh5co-footer" role="contentinfo">
		
		<div class="container">
			<div class="col-md-3 col-sm-12 col-sm-push-0 col-xs-12 col-xs-push-0">
				<h3>关于</h3>
				<p><?php echo ($config["about"]); ?></p>
				<p><a href="#" class="btn btn-primary btn-outline with-arrow btn-sm">来吹比？ <i class="fa fa-arrow-right"></i></a></p>
			</div>
			<div class="col-md-6 col-md-push-1 col-sm-12 col-sm-push-0 col-xs-12 col-xs-push-0">
				<h3>友情链接</h3>
				<ul class="float">
					
					<?php if(is_array($links)): $i = 0; $__LIST__ = $links;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$links): $mod = ($i % 2 );++$i;?><li><a target="_blank" href="http://<?php echo ($links["url"]); ?>"><?php echo ($links["name"]); ?></a></li><?php endforeach; endif; else: echo "" ;endif; ?>
					
				</ul>
				
				
			</div>

			<div class="col-md-2 col-md-push-1 col-sm-12 col-sm-push-0 col-xs-12 col-xs-push-0">
				<h3>Follow Me</h3>
				<ul class="fh5co-social">
					<li><a target="_blank" href="https://github.com/isuoge"><i class="fa fa-github"></i>isuoge</a></li>
					<li><a target="_blank" href="http://weibo.com/5770656991/"><i class="fa fa-weibo"></i>isuoge-com</a></li>
					<li><a href="/index.php?c=GuestBook&a=index"><i class="fa fa-envelope-o"></i>水墙找</a></li>
					<li><a href="#"><i class="fa fa-heart-o"></i></a></li>
				</ul>
			</div>
			
			
			<div class="col-md-12 fh5co-copyright text-center">
				<p>&copy; 2016 isuoge.com All Rights Reserved. <span>Designed  <i class="fa fa-cloud"></i> by <a href="#/" target="_blank">isuoge</a></span></p>	
			</div>
			
		</div>
	</footer>
	</div>
	
	<!-- jQuery -->
	<script src="/Public/js/jquery-1.11.0.js"></script>
	<!-- jQuery Easing -->
	<script src="/Public/js/home/jquery.easing.1.3.js"></script>
	<!-- Bootstrap -->
	<script src="/Public/js/bootstrap.min.js"></script>
	<!-- Waypoints -->
	<script src="/Public/js/home/jquery.waypoints.min.js"></script>
	<!-- Owl Carousel -->
	<script src="/Public/js/home/owl.carousel.min.js"></script>
	<!-- Flexslider -->
	<script src="/Public/js/home/jquery.flexslider-min.js"></script>

	<!-- MAIN JS -->
	<script src="/Public/js/home/main.js"></script>
	<script src="/Public/js/home/jquery.grid-a-licious.min.js" type="text/javascript" charset="utf-8"></script>
	
	
	
	
	
	</body>
</html>